It is at least very similar. Also, from the point of view of those who are opposed to it, racial profiling would still be wrong if it were effective (i.e. if race could actually provide evidence).
There's a number of reasons why racial profiling is considered wrong. Two of the biggest ones are that a) race is something that cannot be controlled, it is not a choice, and discrimination based on innate characteristics is wrong; and b) it's not effective.
However, language is a choice. Language is something that can be controlled. If you're being discriminated against because your language is a very strong indicator that you are a foreign national from an embargoed country, then it's really hard to say that linguistic profiling is wrong, because the two biggest objections to racial profiling don't apply.
Language is very much not a choice. I would love to be able to speak English without making it obvious that English is not my native language – but I can’t. It’s very, very hard to be able to do that. People will always know that I didn’t grow up with English. People will always suspect that I wasn’t born in any English-speaking country.
Other characteristics that serve for racial profiling might be harder to change (some might not be changeable at all) but they are still in principle the same. (Someone wearing clothing that is more typical elsewhere could much easier change his or her clothing than I can get rid of my accent. That doesn’t, however, exclude the possibility of racial profiling based on clothing.)
Nobody's talking about discrimination based on whether it sounds like you're a native speaker. The important factor was the specific language you're speaking, not the fluency in it. If you speak English poorly, well, millions of other people in this country do too, so who cares. But if you're speaking Farsi, then it's perfectly reasonable to suspect that you're an Iranian citizen.